<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>

<body>
<div id="app">

</div>

<script>
    //搜狐登录

    Vue.prototype.$http = axios;
    var v = new Vue({
        el: '#app',
        data: {
            hehe: 'hhhhh'
        },
        created: function () {
            // Send a POST request
            this.requestData();
        },
        methods: {
            requestData() {

                this.$http({
                    method: 'post',
                    url: 'http://m.passport.sohu.com/security/login',
                    data: {
                        userid: '1093286982@qq.com',
                        password: 'b5eb172ede28526915106b7c4d2b971e'
                    },
                    headers: {
                        'Content-Type': 'application/x-www-form-urlencoded',
                    }
                }).then(function (res) {

                    // window.alert(JSON.stringify(res))
                    console.log(this);//指向window
                    // return res.data;
                });

            }
        }


    })


</script>

</body>
</html>